import Vue from 'vue'
import App from './App'
import topBar from './pages/components/topBar';
// import noData from './pages/components/noData';
import customBar from './pages/components/custom-tab-bar';
Vue.component('topBar',topBar);
// Vue.component('noData',noData);
Vue.component('customBar',customBar);
Vue.config.productionTip = false
import Vant from 'vant';
Vue.use(Vant);
App.mpType = 'app'
/// 挂载函数
Vue.prototype.setData = function(obj) {
	let that = this;
	let keys = [];
	let val, data;
	Object.keys(obj).forEach(function(key) {
		keys = key.split('.');
		val = obj[key];
		data = that.$data;
		keys.forEach(function(key2, index) {
			if (index + 1 == keys.length) {
				that.$set(data, key2, val);
			} else {
				if (!data[key2]) {
					that.$set(data, key2, {});
				}
			}
			data = data[key2];
		})
	});
}
const app = new Vue({
	...App
})
app.$mount()
